<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>联系我们</title>
		<link rel="stylesheet" href="../../plugin/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/utils.css" />
		<link rel="stylesheet" type="text/css" href="../../css/index.css" />
		<script src="../../plugin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugin/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.client-us {
				padding-bottom: 30px;
				min-height: 500px;
			}
			
			.client-container {
				width: 850px;
				margin: 0 auto;
			}
			
			.layui-form-label {
				text-align: left;
				width: 100.59px;
			}
			
			.layui-input,
			.layui-textarea {
				background: #e6e6e6;
				width: 622.46px;
			}
			
			.layui-textarea {
				min-height: 200px;
			}
			#operate .layui-btn{
				padding: 0 35px;
			}
			.submit-btn {
				letter-spacing: 1px;
				font-size: 16px;
				font-weight: bold;
				background-color: #BED336;
				border: 1px solid #BED336;
				color: #000;
				margin-left: 50px;
			}
			.submit-btn:hover{
				background-color: #000;
				border: 1px solid #000;
				color: #BED336;
			}
			#operate .layui-btn:last-child:hover{
				border-color:#BED336;
			}
			
		</style>
	</head>

	<body>
		<div class="layui-fluid">
			<div class="layui-row header-row">

			</div>
			<div class="client-us">
				<div class="pageBg">
					<div class="pageBg2">
						<div class="pageBg3">
							<h3>联系我们</h3>
							<p>Contact Us</p>
						</div>
					</div>
				</div>
				<div class="client-container">
					<h2 class="page-title">顾客调查</h2>
					<form class="layui-form" action="">
						<div class="layui-form-item">
							<label class="layui-form-label">姓名</label>
							<div class="layui-input-block">
								<input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">联系电话</label>
							<div class="layui-input-block">
								<input type="text" name="phone" required lay-verify="required|phone" placeholder="请输入联系电话" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公司名称</label>
							<div class="layui-input-block">
								<input type="text" name="company" required lay-verify="required" placeholder="请输入您的公司名称" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">联系地址</label>
							<div class="layui-input-block">
								<input type="text" name="location" required lay-verify="required" placeholder="请输入联系地址" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">邮箱</label>
							<div class="layui-input-block">
								<input type="text" name="email" required lay-verify="required|email" placeholder="请输入您的邮箱" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">内容</label>
							<div class="layui-input-block">
								<textarea name="message" placeholder="请输入您想说的内容" class="layui-textarea"></textarea>
							</div>
						</div>
						<div class="layui-form-item" id="operate">
							<div class="layui-input-block" style="margin-top: 50px;">
								<button class="layui-btn layui-btn-radius submit-btn" lay-submit lay-filter="formClient">立即提交</button>
								<button type="reset" class="layui-btn layui-btn-radius layui-btn-primary">重置</button>
							</div>
						</div>
					</form>
				</div>

			</div>

			<div class="footer-nav">

			</div>

	</body>
	<script src="../../utils/api/index.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../utils/common/index.js" type="text/javascript" charset="utf-8"></script>

</html>
<script type="text/javascript">
	layui.use('form', function() {
		var form = layui.form;
		form.verify({
			phone: [/^1\d{10}$/, "请输入正确的手机号"],
			email: [/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "邮箱格式不正确"]
		});
		form.on('submit(formClient)', function(data) {
			$.post(requestUrl.baseUrl + '/' + requestUrl.apiUrl.clientEnquiry, data.field, function(data) {
				if(data.code == 0) {

				}
			})
			return false;
		});

	});
</script>